﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace OhalcLib
{
    [Serializable()]
    public class Trade : ISerializable 
    {
        public DateTime OpenTime { get; set; }
        public DateTime CloseTime { get; set; }
        public Decimal OpenPrice { get; set; }
        public Decimal ClosePrice { get; set; }
        public Decimal Result { get; set; }
        public Direction TradeDirection { get; set; }

        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("OpenTime", OpenTime);
            info.AddValue("CloseTime", CloseTime);
            info.AddValue("Result", Result);
            info.AddValue("TradeDirection", TradeDirection);
            info.AddValue("OpenPrice", OpenPrice);
            info.AddValue("ClosePrice", ClosePrice);
        }
    }
}
